package com.bblocks.enums;
/**
 * @Author: Mei
 * 系统返回枚举
 * 注意：异常类型分为两类：
 * a、系统错误 目前暂定<2000且不为0 ,跨系统直接提示：“系统故障请稍后再试”
 * b、业务异常，>=2000以及0 为业务异常，可以直接提示用户
 * @Date: created in 2018/12/27 11:39.
 */
public enum SysEnum {
    //成功
    SUCCESS(1, "操作成功"),

    //异常
    ERROR(0, "操作失败"),//业务异常
    UNKNOWN_ERROR(-1, "未知错误"),//系统异常
    LOGIN_FAILED(500,"注册失败"),
	SYS_ERROR(9, "系统故障,请稍后再试!"),//系统异常
	ERR_REPEAT (8, "请勿重复请求"),//超过频率的提交
    ERR_NO_REALIZE (7, "未实现"),//未实现业务

    //参数错误
    PARAMS_IS_NULL(10001,"参数为空"),
    PARAMS_NOT_COMPLETE(10002,"参数不全"),
    PARAMS_TYPE_ERROR(10003,"参数类型错误"),
    PARAMS_IS_INVALID(10004,"参数无效"),
    PARAMS_IS_EXPIRED(10005,"参数过期"),
    PARAMS_VERIFY_ERR(10006,"参数校验失败"),


    //用户
    NOT_LOGIN(20001, "请先登录平台"),
    NOT_USER(20002, "该用户未注册"),
    USER_EXIST (20003, "用户已存在"),
    USER_FORBIDDEN (20004, "该用户已被禁用,联系管理员解除"),
    NOT_REAL(20005, "用户未实名认证"),
    NOT_AGENT(20006, "用户并非经纪人"),
    USER_BELONG_OHTER(20007, "用户已经加入商家"),
    USER_NOT_BELONG_OHTER(20008, "用户不是商家"),
    NO_USER(20009, "该用户不存在"),
	NO_PASSWORD(20010, "密码不正确"),
    USER_EXIST_ROLE(20011, "用户已经绑定商家，只能认证独立个人"),
    USER_EXIST_ROLE_TO(20012, "用户已经绑定该独立角色，请重新选择"),
    USER_IS_APPLIED(20012, "您已经申请过了，请耐心等待审核"),
    USER_IS_REMIND(20013, "您已成功订阅提醒，请勿重复操作"),
    USER_IS_NOT_COMPANY(20015, "该用户不存在公司"),
	USER_ROLE_REQ_ERR(20019, "角色申请失败"),
	USER_TYPE_ERR(20019, "用户类型错误"),
	BIND_ERROR(20030, "该手机号已绑定微信"),
	BIND_MOBILE_ERROR(20031, "已绑定手机"),


	MERCHANT_NO_ERR(20101, "无此商家"),
	MERCHANT_STATE_ERR(20102, "商家已停止"),
	SHOP_NO_ERR(20103, "未开通店铺"),

    MERCHANT_ERR(20104, "商家信息错误"),


	PARTNER_NOT_EXIST(20201, "未申请合伙人"),
	PARTNER_NO_REVIEWED(20202, "合伙人未审核"),
	PARTNER_AUDIT_NO_PASS(20203, "合伙人审核未通过"),
	PARTNER_RELATIONSHIP_TERMINATED(20204, "合伙人关系已终止"),

    //数据
    NOT_DATA(30001, "数据不存在"),
    DATA_IS_WRONG(30002,"数据有误"),
    DATA_ALREADY_EXISTED(30003, "数据已存在"),
    DATA_VIOLATION(30004, "数据违规"),
    DATA_PERMISSION_DENIED(30005, "数据操作权限不足"),

    //权限错误
    PERMISSION_DENIED(40001, "权限不足"),

    //上传异常
    UPLOAD_ERROR(50001, "上传文件异常"),
    UPLOAD_EMPTY(50002, "上传文件为空"),
    UPLOAD_VERIFIC(50003, "上传文件格式不正确"),

    //验证码
    IDENTIFYING_CODE_ERREO(60001, "验证码错误"),
    IDENTIFYING_CODE_TIMEOUT(60002, "验证码超时"),
    IDENTIFYING_ERROR(60003, "验证码发送异常"),
    IDENTIFYING_COMPARE_ERROR(60004, "验证码不正确"),
    IDENTIFYING_NOT_SEND(60005, "验证码未发送"),
	IDENTIFYING_SENDED(60006, "验证码已发送"),
    IDENTIFYING_CODE_NONE(60007 ,"验证码超时/未发送"),


    //业务
    NOT_HOUSEHOLDER_INFO(70001, "户主信息为空"),
    NOT_FOUND_ADDRESS(70002, "未找到该地址或地址不完整"),
    NOT_APPOINTMENT(70003, "该房源已预约，不能重复预约"),
	GOODS_LIMIT(70005, "限购"),
	GOODS_INVALID(70006, "产品/服务无效"),
	GOODS_NOT_ENOUGH(70007, "库存不足"),


    //带客通相关异常
    DK_FLOW_HANLE(80001,"当前房源在带客通流程中，勿删除！"),
    DK_FLOW_RECO_REPEAT(80002,"该房源已推荐！"),
    DK_FLOW_CHECK_USE(80003,"该房源不可走带客通！"),
    DK_FLOW_CHECK_GUID(80004,"当前推荐单已经被抢,请刷新页面！"),
    DK_FLOW_CHECK_PUBLISHED(80005,"当前房源的状态不是发布中！"),
    DK_FLOW_UPDATE_COMPLETE_FAILURE(80006,"更新完成状态时失败！"),
    DK_FLOW_NO_COMMISSION(80007, "带客人未结佣！"),
    DK_FLOW_NO_SETTING(80008, "带客惠佣金未设置!"),
    DK_FLOW_NO_PLAN(80009, "带客惠佣金方案未设置!"),
    DK_FLOW_MOVE(80010, "无需移交"),
    DK_FLOW_CANCEL(80011,"带客通无法作废！"),
    
    //加解密相关
    DECRYPT_ERROR(90001,"解密失败!"),
    ENCRYPT_ERROR(90002,"加密失败!"),
    
    //套餐相关
    PACK_NOT_EXISTS(11001,"当前套餐不存在!"),
    PACK_EXPIRE(11002,"当前套餐已经过期!"),
    PACK_BALENCE_INSUFFICIENT(11003,"使用次数已超过限制!"),
    PACK_BALENCE_DAY_OUT(11003,"使用次数已超过每日次数!"),
    
    //支付-转账 相关
    PAY_ERROR(12001,"支付异常!"),
    TRANS_MONEY_ERROR(12002,"转帐异常!"),
    GET_CERT_SYN_ERROR(12003,"获取证书序列号异常!"),
	QUERY_PAY(12004,"查询订单异常!"),
	PAY_CHN_ERROR(12005,"未知渠道!"),
	PAY_NO_NEED(12009,"0元单算直接支付成功!"),

    
    //余额 相关
    CUR_BALANCE_NOT_EXISTS(13001,"当前账户余额不存在!"),
    TAR_BALANCE_NOT_EXISTS(13001,"当前账户余额不存在!"),
    BALANCE_NOT_SUFFICIENT(13001,"账户余额不足!"),
    ERR_ACC_COMM(13099,"账户操作错误!"),
    ERR_ACC_WITHDRAW_LOWER(13010,"提现金额过低!"),
    ERR_ACC_WITHDRAW_OVER(13011,"提现金额过高!"),
    
    //转租 相关
    SUBLEASE_EXPIRE_ERROR(14001, "转租确认单已过期！"),
    
    // 房源
    HOUSE_EXIST (15001, "房源已存在"),
    HOUSE_ID_EXIST (15002, "小区id不存在"),
    COMPANY_ID_NOT_EXIST (15003, "公司id不存在"),
    HOUSE_NO_SALE (15004, "该房源不可售!"),
    //订单
    CREATE_ORDER_ERROR(16101, "创建订单失败"),
	NO_THE_ORDER(16102, "无此订单"),
	NO_THE_ORDER_USER(16103, "用户无此订单"),
	STATE_ERR_ORDER(16103, "订单状态非法"),
	AMT_ERR_ORDER(16104, "订单金额不一致"),
    ACTIVITY_ATTEND_RECORD(16001,"可抽奖次数为不足"),
    ACTIVITY_UPPER_LIMIT(16002,"本活动参与次数已达上限"),
    ACTIVITY_USER_EXIST(16003,"用户已存在"),
    ACTIVITY_GOODS_MX(16004,"库存不足 "),
    ACTIVITY_OVER(16005,"活动已结束 "),
    ACTIVITY_GOODS_NO_CONDITION(16006,"活动礼品领取条件不满足"),
    ACTIVITY_NO_OVER_FOR_PAY(16007,"已经付款的活动,不允许取消"),
    ACTIVITY_NO_PAY_FOR_STATUS(16008,"已经支付或者取消的活动不允许再次支付"),
    ACTIVITY_AUTOMATIC_ERROR(16009,"只有未开启的活动才能设置自动开启"),
    ACTIVITY_STOP_ERROR(16010,"只有进行中的活动才能关闭"),
    ACTIVITY_SPECIAL_AMOUNT_INSUFFICIENT(16011,"活动专项金额不足,请及时充值"),
    ACTIVITY_START_FOR_BW(16012,"该文章已经添加活动,请勿重复添加"),
    ACTIVITY_AMOUNT_NO_UPDATE(16013,"已经支付的活动,不允许修改"),
	ACTIVITY_RULE_NO_DEL_FOR_PERMISSION(16014,"正在进行的活动,不允许删除规则"),
	ACTIVITY_UPPER_LIMIT_TODAY(16015,"活动今日领取已经达到上限"),
	ACTIVITY_GOODS_RECEIVE_OVER(16016,"活动礼品已经领取完"),
	ACTIVITY_PAY_GLY(16017,"只有管理员才能立即支付"),

    //红包
    COUPON_ERROR(17001, "红包异常"),
    COUPON_OVER(17002, "红包已抢完！"),
    COUPON_TOPLIMIT(17003, "没抢到，您的红包优惠券领取已达到上线！"),
    COUPON_NO_EXIST(17004, "抱歉,优惠券不存在！"),
    COUPON_ALREADY_USED(17005, "抱歉,优惠券已经使用！"),
    COUPON_NO_USED_FOR_GOODS(17006, "抱歉,优惠券无法在该商品上使用！"),

    //装修
    ASSESS_NO(18001, "暂无此户型装修比例"),

	//合伙人
	HHR_DOES_NOT_EXIST(19001, "合伙人账户不存在"),



	// 爆文vip已经过期
	BW_VIP_EXPIRED(28001, "爆文vip已经过期"),

	//接单管理
	DISPATCH_NOT_ASSIGN(14001, "此单已经指派，不可以再重复指派"),
	DISPATCH_NOT_OWNER(14002, "非单据拥有人"),
	DISPATCH_ERR_STATE(14003, "单据状态错误"),


    SYS_COMM_RETERR (6100, "上游通道返回失败"),



	//系統相关以及安全
	SYS_NO_AUTH (91001, "无授权"),

	//系统调用间，服务异常
	SYS_SERVER_ERROR_FREQUENT(92001, "系统故障,调用频繁!"),
	SYS_SERVER_INVALID_REQUEST(92002, "系统故障,无效请求!"),
	SYS_SERVER_INTERNAL_ERROR(92003, "系统故障,相关服务故障!"),
	SYS_SERVER_FUSIBNG(92005, "系统故障,相关服务故障暂停!"),

    ;

	
    private Integer code;
    private String message;

    SysEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
